from ex_04 import *
db = []
print("📚 Student Database System\n═══════════════════════════")
add_student(db, create_student("Alice", 20, 85))
add_student(db, create_student("Bob", 21, 92))
add_student(db, create_student("Carol", 19, 78))
add_student(db, create_student("David", 22, 89))
add_student(db, create_student("Eve", 20, 88))

print(f"Added {len(db)} students successfully!\n")
avg_grade = calculate_class_average(db)
top_student = get_top_student(db)
print("Class Statistics:")
print(f"  Average grade: {avg_grade:.2f}")
print(f"  Top student: {top_student[0]} ({top_student[2]})\n")


print("Student lookup:")
stu = find_student_by_name(db,"Alice")
print(f"{stu[0]}:{stu[1]} years old, Grade: {stu[2]}")    
